package ua.org.extjsbuilder.actions;

import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IViewActionDelegate;
import org.eclipse.ui.IViewPart;

import ua.org.extjsbuilder.wizards.ExtjsNewProjectWizard;

public class NewExtjsProjectAction implements IViewActionDelegate {

	private Shell shell;
	
	public NewExtjsProjectAction() {
		super();
	}

	public void run(IAction action) {
		WizardDialog newProjectWizard = new WizardDialog(shell, new ExtjsNewProjectWizard());
		newProjectWizard.open();
	}

	public void selectionChanged(IAction action, ISelection selection) {
	}

	public void init(IViewPart view) {
		shell = view.getSite().getShell();
	}
}
